import request from '../../utils/request'

/**
 * 新增营销线索
 * 
 */
export async function addMarket( data ) {
	return request(apiPath.mc + "/api/market", {
		method: 'post',
		data
	});
}

  /**
   * 删除营销线索
   * 
   */
export async function deleteMarket({ id }){
    return request(apiPath.mc + "/api/market/" + id,{
        method: 'delete'
    });
}
   
   /**
    *获取营销线索详情
    *
    */
export async function getMarketById({ id }){
    return request(apiPath.mc +  "/api/market/" + id,{
        method: 'get'
    });
}


    /**
     * 分页获取客户营销线索
     * 
     */
export async function getListByCstIdForPage({ cstId, page}){
    return request(apiPath.mc + "/api/markets/" + cstId,{
        method: 'get',
        data: { page: page.page, size: page.size }
    });
}
